home *** CD-ROM | disk | FTP | other *** search
/ The Complete Utilities To…ka 501 Killer Utilities! / 501 Killer Utilities! (Macworld July 1995).cdr / Calculators / ProCalc 1.3.0 / ProCalc / ProCalc.rsrc / TEXT_227_Help - Sequential, Algebraic, and RPN.txt < prev    next >
Encoding:
Text File  |  1995-01-05  |  3.9 KB  |  31 lines

  1. Sequential, Algebraic, and RPN Entry
  2.  
  3. ProCalc enables the use of one of three operation-ordering logics. Sequential ordering evaluates all operations in the order they are entered, Algebraic ordering evaluates operations in the order dictated by standard algebraic rules, and RPN evaluates operations according to the rules of Reverse Polish Notation,.
  4.  
  5. Sequential Logic
  6.  
  7. Sequential logic is the simplest of the three, evaluating all operations in the order entered. For example, 1+2*3 is evaluated as (1+2)*3, and the result is 9.
  8.  
  9. Algebraic Logic
  10.  
  11. Algebraic ordering evaluates operations in the order dictated by standard algebraic rules, delaying operations as necessary to complete the calculation. Using the above example, 1+2*3 is evaluated as 1+(2*3), and the result in this case is 7. Note that the parenthesis are used internally by ProCalc, you can still use parenthesis in your calculations to modify the order of operations.
  12.  
  13. The algebraic order used by ProCalc in evaluating expressions is shown below (an operation with a higher precedence automatically completes a preceding operation with a lower precedence):
  14.  
  15.    1   delta percent
  16.    2   universal power, universal root
  17.    3   multiplication, division, modulus
  18.    4   addition, subtraction
  19.    5   and
  20.    6   or, exclusive or
  21.    7   equals (competes all pending operations)
  22.  
  23. Reverse Polish Notation
  24.  
  25. Reverse Polish Notation is a special operating logic used in some HP calculators in which the operands are entered first, separated by [Enter], with the operator following the operands. To calculate the above example in RPN, you would enter 2 [Enter] 3 [ x ] 1 [ + ]. This is equivalent to 1+(2*3) in Sequential mode, or simply 1+2*3 in Algebraic mode. There are many references available if you wish to learn RPN, as it will not be covered here in depth. It is included in ProCalc for those who are proficient in its use, and prefer it to ‚Äòstandard‚Äô entry logic.
  26.  
  27. ProCalc's implementation of RPN is as close to the HP standard as possible. Specialized RPN features such as stack roll and last entry are included, as well as an indicator in the display that shows the number of entries on the stack, and a popup stack display (click and hold the mouse button on the main display to popup the stack history). In RPN mode the [CLX] button clears only the X (display) register, and never effects the rest of the stack. The [CLS] (Clear Stack) button clears the entire stack and, if a variable-sized stack is selected, reduces it to one register (the X, or display register).
  28.  
  29. ProCalc implements a standard four-register stack, using the RPN-standard X, Y, Z, and T registers. You can select (in Preferences) whether you want ProCalc to use a fixed-sized stack (stack size fixed at four), or a variable sized stack. Using a variable sized stack, when the calculator is first started, or is cleared with [CLS], the stack consists of a single entry, the X, or display register, which is also cleared to zero. As numbers are entered, the stack fills up, and as calculations are performed, the stack may grow or shrink, depending on the calculation. The current stack size is shown in the display as the stack indicator, which replaces the parenthesis level indicator. Since there is always at least one register in the stack (the X register), the indicator shows the status of the Y, Z, and T registers only. One solid bar indicates the Y register contains a value, two solid bars indicate Y and Z contain values, and three bars indicate Y, Z, and T contain values (the stack is full). When the stack drops and the stack is full, the T register is copied down into the Z register, allowing calculations with a constant. Note that once the stack becomes full, it does not shrink, as the copy-down feature prevents that. The only way to clear the stack in this case is with the [CLS] button, or the Clear menu command in the Edit menu, which is the equivalent of [CLS] when in RPN mode.
  30.  
  31.